package com.itmk.business.product.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.itmk.business.product.entity.Product;
import com.itmk.vo.req.ProductReqVO;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

public interface ProductMapper extends BaseMapper<Product> {

    IPage<Product> getProductList(IPage<Product> productIPage, @Param("productReqVO") ProductReqVO vo);
    List<Object> getProductListsByProcedure(@Param("productReqVO") ProductReqVO vo);
//    清除临时表信息
    void truncateTable();

    @Select(
            "select product_name,product_id,category_name from product join product_category " +
                    "on product.category_id=product_category.category_id"
    )
    List<Map<String,Object>> getAllProductList();
}
